package xyz.scootaloo.draft.tool

import org.junit.Test
import xyz.scootaloo.alg.tool.IntSet

/**
 * @author flutterdash@qq.com
 * @since 2021/4/17 16:00
 */
class IntCacheTests {

    @Test
    fun test0() {
        val set = IntSet(200)
        set.put(0)
        set.put(199)
        println(set.contains(0))
        println(set.contains(199))
        set.remove(199)
        println(set.contains(199))
        set.clear()
        println(set.contains(0))
    }

    @Test
    fun test1() {
        val set = IntSet(-20, 20)
        set.put(-20)
        set.put(19)
        println(set.contains(-20))
        println(set.contains(19))
        println(set.contains(-19))
        set.remove(-20)
        println(set.contains(-20))
    }

}
